<?php
namespace Framework\DiServices;

use Phalcon\Mvc\Model\MetaData\Files;
use Phalcon\Mvc\Model\MetaData\Memory;

class ModelsMetadata
{
    public static function new($metadataPath)
    {
        if (is_dir($metadataPath)) {
            return new Files(['metaDataDir' => $metadataPath]);
        }

        return new Memory();
    }
}
